package com.sz.biz.app.web.security;

import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.util.ByteSource;

import java.util.HashMap;
import java.util.Map;

/**
 * Function: TODO: ADD FUNCTION <br>
 * Author: Charles. <br>
 * Date: 2017-05-20 11:27:00.
 */
public class MyAuthenticationInfo extends SimpleAuthenticationInfo {

    private int appDomain;
    private int accountId;
    private String accountName;
    private Map<String, Object> properties = new HashMap<>();


    public MyAuthenticationInfo(int appDomain, int accountId, String accountName, String password, ByteSource credentialsSalt, String realmName) {
        super(accountName, password, credentialsSalt, realmName);
        this.appDomain = appDomain;
        this.accountId = accountId;
        this.accountName = accountName;
    }

    public int getAppDomain() {
        return appDomain;
    }

    public int getAccountId() {
        return accountId;
    }

    public String getAccountName() {
        return accountName;
    }

    public Map<String, Object> getProperties() {
        return properties;
    }

    public Object getProperty(String key) {
        return this.properties.get(key);
    }

    public void setProperty(String key, Object value) {
        this.properties.put(key, value);
    }

}
